<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>{{ productname }}</title>
  <link rel="stylesheet" href="css/format.css" type="text/css">
  {% block headcss %}{% endblock %}
  <script src="js/cookie.js" type="text/javascript"></script>
  <script src="js/common.js" type="text/javascript"></script>
  <script src="js/jquery.js" type="text/javascript"></script>
  <script src="js/jquery.hotkeys.js" type="text/javascript"></script>
  <script type="text/javascript">
    var googleuser = "{{ googleuser }}";
	var productname = "{{ productname }}";
    function google_logout(){
		window.location = "{{ logouturl }}";
	}
	function switch_month(){
		window.location = "{{ myhost }}?view=month";
	}
	function switch_list(){
		window.location = "{{ myhost }}?view=list";
	}
	function switch_import(){
		window.location = "{{ myhost }}/port?function=import"
	}
	function switch_export(){
		window.location = "{{ myhost }}/port?function=export"
	}
	function switch_doc(){
		window.location = "{{ myhost }}/help"
	}
	window.onload = function(){
		status_bar_init();
		{% block onload %}{% endblock %}
	}
  </script>
  {% block headjs %}{% endblock %}
</head>
<body>
  <div id="topprodname">
    {{ googleuser }} - {{ productname }}
  </div>
  <div id="controlpanel">
    <div id="controlleft">
      <input type="button" value="月曆" id="switchmonth" onclick="switch_month()">
      <input type="button" value="清單" id="switchlist" onclick="switch_list()">
    </div>
    <div id="controlright">
      <input type="button" value="匯入" id="buttonimport" onclick="switch_import()">
      <input type="button" value="匯出" id="buttonexport" onclick="switch_export()">
	  <input type="button" value="說明" id="aboutandhelp" onclick="switch_doc()" style="background-color: firebrick;">
      <input type="button" value="{{ logouttext }}" id="googlelogout" onclick="google_logout()" style="background-color: darkgray">
    </div>
  </div>
  <div id="helplinkbar" style="display: none;">
    <a href="{{ myhost }}/help?page=index">說明首頁</a>
	<a href="{{ myhost }}/help?page=browser">瀏覽器測試</a>
	<a href="{{ myhost }}/help?page=about">關於本站</a>
  </div>
  <div id="statusbar">
  </div>
  {% block body %}{% endblock %}
  <div id="bottomemptybar">
  </div>
</body>
</html>
